export const UI_TYPE_LIST = [
    { label: '单行输入框', value: 0 },
    { label: '多行输入框', value: 1 },
    { label: '日期选择框', value: 2 },
    { label: '下拉菜单', value: 3 },
    { label: '枚举结构', value: 4 },
    { label: '开关按钮', value: 5 },
]

export const DATA_TYPE_LIST = [
    { label: '数字', value: 0 },
    { label: '日期', value: 1 },
    { label: '字符串', value: 2 },
    { label: '布尔', value: 3 },
    { label: '枚举', value: 4 }
]

export const TARGET_TYPE_LIST = [
    { label: '住宅房地产', value: 1 },
    { label: '工业房地产', value: 2 },
    { label: '办公房地产', value: 3 },
    { label: '商业房地产', value: 4 },
    { label: '住宅用地', value: 101 },
    { label: '工业用地', value: 102 },
    { label: '商务用地', value: 103 },
    { label: '商业用地', value: 104 },
    { label: '综合用地', value: 105 },
    { label: '其他用地', value: 100 },
]

export const PATTERN_TYPE_LIST = [
    { label: '资质证书', value: 0 },
    { label: '公司类型', value: 1 },
]

export const TransactionSituationList = [
    { label: '司法拍卖', value: 1, bgColor: 'linear-gradient(270deg, #C00F0C 0%, #F32B2B 100%);' },
    { label: '一手出让', value: 2, bgColor: 'linear-gradient(270deg, #FFCA37 0%, #FF9010 100%);' },
    { label: '评估案例', value: 3, bgColor: 'linear-gradient(270deg, #009951 0%, #039A92 100%);' },
    { label: '买卖成交', value: 4, bgColor: 'linear-gradient(270deg, #37EBFF 0%, #0A6BB0 100%);' },
    { label: '资产交易', value: 5, bgColor: 'linear-gradient(270deg, #6A7FF3 0%, #9A6DF2 100%);' },
]

export const typeNameList = [
    { label: '自动评估', value: 0 },
    { label: '人工评估', value: 1 }
]

export const STATUS_TYPE_LIST = [
    { label: '待提交', value: 0 },
    { label: '已提交待处理', value: 1 },
    { label: '已回价', value: 2 },
    { label: '回价失败', value: 3 },
]

export const useRightList = ['出让', '划拨']


export const getBaseOssUrl = ()=>{
    let origin = window.location.origin;
    if(process.env.VUE_APP_BASE_API=='/user/api'||origin.indexOf('tst.zhongchengpg.com')>-1){
        return 'https://uniland-tsttst.oss-cn-hangzhou.aliyuncs.com/'
    }else{
        return 'https://uniland-tst.oss-cn-hangzhou.aliyuncs.com/'
    }
}

export const OSS_BASE_URL = getBaseOssUrl()


// export const API_BASE_URL = 'https://tst.zhongchengpg.com/'

export const getBaseUrl = ()=>{
    let origin = window.location.origin;
    if(process.env.VUE_APP_BASE_API=='/user/api'){
        return process.env.VUE_APP_BASE_API
    }else{
        return origin + '/user/api'
    }
}

export const API_BASE_URL = getBaseUrl();